1. Field of the Invention
The present invention relates to a method for controlling an electronic apparatus, the electronic apparatus including a USB interface used for connecting a USB device of a first device class in a first operation mode controlled by a first control program, a program for controlling the electronic apparatus, the electronic apparatus, and a recording apparatus.
2. Description of the Related Art
Hitherto, in an electronic apparatus controlled by a CPU (central processing unit) and a control program, a technique of using a control program for a manufacturing process in addition to a control program for a normal operation of the apparatus has been known.
Among these control programs, the control program for an application is provided to a user of the electronic apparatus, operates in a user mode under a user environment, and controls an original operation of the apparatus.
On the other hand, the control program of a factory mode is used for the purpose of operating the apparatus in a so-called factory mode in a process of manufacturing, testing, inspecting, or repairing, so as to determine the status of hardware/software of the apparatus. Also, the control program of the factory mode has a function of checking hardware/software of the apparatus or supporting an operation performed by an operator, and is used to reliably and easily perform a manufacturing process.
As described above, in a known configuration of an electronic apparatus, a user mode as a first operation mode and a second mode used for manufacturing, testing, inspecting, or repairing are provided. Assuming that the second mode is different from the first mode which performs an original operation of the apparatus, the second mode includes a mode that can execute a hidden command for a power user as well as the above-described applications.
According to a known art, control programs of the first and second modes are shipped while being stored in a program memory represented by a ROM. Such a configuration is also adopted in an inkjet printer, for example (Japanese Patent Laid-Open Nos. 09-305839, 11-242596, and 2000-155675).
Hereinafter, a case where the control programs of the first and second modes are control programs of the above-described user mode and a factory mode is discussed.
When a product is provided with a ROM storing control programs of both the user mode and the factory mode, the factory mode is not open to general users and is not started as long as a special operation is not performed in a usual case. The product specification needs to be designed so that the factory mode is started only by a highly specialized operation (not known to the user) so that the factory mode is not executed by a user by mistake. In that case, an operation of starting the factory mode becomes complicated disadvantageously. Accordingly, the following problem occurs: providing this type of mode takes time despite a purpose of providing the factory mode in a manufacturing process that should be performed in shorter time.
Furthermore, in a configuration of storing control programs of both the user mode and the factory mode together, additional capacity in the program memory is required for storing the control program of the factory mode, which is unnecessary to the user. This causes an increase in cost of the apparatus. Of course, in this configuration, when the factory mode program is to be modified due to a modification in a manufacturing process, the entire control program needs to be redesigned even if the user mode is not modified. Accordingly, the ROM is also redesigned.
The capacity of a memory can be minimized by using the following configuration. That is, a rewritable nonvolatile memory (flash memory) is used as a program memory, a factory mode program is executed during manufacturing, and the memory is rewritten with a user mode program before shipment.
A technical idea of externally performing version upgrade of a control program already exists. Also, it is known as the most general method that a new control program is downloaded from a PC (personal computer) via a PC interface, such as a USB, in a peripheral apparatus.
This method requires a PC. Thus, a system to rewrite the control program is expensive, the operation is complicated, and rewriting takes much time, so that this method is not appropriate to a manufacturing process.
On the other hand, a method for performing version upgrade of a control program without using a PC is also suggested. For example, the above-mentioned three patent documents suggest a configuration of performing version upgrade of a control program by using a memory card. However, those known arts are based on the assumption that a rewritable nonvolatile memory such as a high-cost flash memory is used. Furthermore, when a memory card is used, a memory card interface needs to be provided to externally supply a control program.
Even if a memory card is already provided on the apparatus for other uses, adapting it for upgrade requires additional resources. Japanese Patent Laid-Open No. 06-105039 suggests a technique of storing many types of applications in a memory card, selecting a necessary application therefrom, downloading the application to a RAM of an apparatus, and operating the application. In this case, too, a memory card interface is required, and a unit and an operation to select a necessary application from among many applications stored in the memory card are required.
As described above, according to the known arts, a waste of providing an interface such as a memory card only for input/output of program data occurs. Also, even if the memory card can be used in another application, units for identifying and selecting a file in the card and a selecting operation are required.
In the above description, the case where the control programs of the first and second modes are control programs of the user mode and the factory mode, respectively, has been discussed. However, problems about operability and memory capacity are common to an electronic apparatus in which the second mode is a mode of another application.